using System.Collections.Generic;
using UnityEngine;

public class DamageFog : Obstacle
{
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    public float attackRange,height,speed,maxheight;
    bool isAttack;
    public GameObject fog;
    void Start()
    {
        Create();
    }
    void Create()
    {
        fog=Instantiate(fog);
        fog.transform.SetParent(transform);
        fog.transform.localPosition=new Vector3(0,height,0);
        
    }
    // Update is called once per frame
    void Update()
    {
        fog.transform.position+=speed*Time.deltaTime*Vector3.up;
        if(fog.transform.position.y>maxheight)
        {
            fog.transform.position=transform.position+new Vector3(0,height,0);
        }
    }
}
